

#ifndef WXSAUIMANAGER_H
#define WXSAUIMANAGER_H

#include "wxsAuiPaneInfoProperty.h"

#include <wxwidgets/wxsparent.h>
#include <wxwidgets/wxsflags.h>
#include "../wxAuiToolBar/wxsAuiToolBar.h"
#include "wxSmithAuiManager.h"

using namespace wxsFlags;


class wxsAuiPaneInfoExtra: public wxsPropertyContainer
{
    public:

        // Standard pane types
        static const long DefaultPane = 1;
        static const long CenterPane  = 2;
        static const long ToolbarPane = 3;

        // Properties
        wxString m_Name;
        long m_StandardPane;
        wxString m_Caption;
        bool m_CaptionVisible;
        bool m_MinimizeButton;
        bool m_MaximizeButton;
        bool m_PinButton;
        bool m_CloseButton;
        long m_Layer;
        long m_Row;
        long m_Position;
        bool m_Docked;
        long m_DockDirection;
        bool m_DockFixed;
        long m_DockableFlags;
        bool m_Floatable;
        wxsPositionData m_FloatingPosition;
        wxsSizeData m_FloatingSize;
        bool m_Resizable;
        bool m_Movable;
        long m_Gripper;
        bool m_PaneBorder;
        bool m_Visible;
        bool m_DestroyOnClose;
        bool m_FirstAdd;        //Allow changing properties when adding the item in the editor and
                                
        wxsAuiPaneInfoExtra()
        :
            m_Name(_("PaneName")),
            m_StandardPane(0),
            m_Caption(_("Pane caption")),
            m_CaptionVisible(true),
            m_MinimizeButton(false),
            m_MaximizeButton(false),
            m_PinButton(false),
            m_CloseButton(true),
            m_Layer(0),
            m_Row(0),
            m_Position(0),
            m_Docked(true),
            m_DockDirection(wxAUI_DOCK_LEFT),
            m_DockFixed(false),
            m_DockableFlags(wxALL),
            m_Floatable(true),
            m_Resizable(true),
            m_Movable(true),
            m_Gripper(0),
            m_PaneBorder(true),
            m_Visible(true),
            m_DestroyOnClose(false),
            m_FirstAdd(true),
            m_LastDockDirection(0)
        {
        }

        wxString AllParamsCode(wxsCoderContext* Ctx,wxsItem* ChildPane);
        wxAuiPaneInfo GetPaneInfoFlags(wxWindow* Parent,wxsItem* ChildPane,bool Exact);

    protected:

        virtual void OnEnumProperties(long Flags);

        
        virtual void OnPropertyChanged();

    private:

        long m_LastDockDirection;
        long m_LastStandardPane;
};



class wxsAuiManager: public wxsParent
{
    public:

        
        wxsAuiManager(wxsItemResData* Data);

    protected:

        
        virtual void OnBuildAuiManagerCreatingCode();

        
        virtual void OnAddAuiMangagerQPP(wxsAdvQPP* ) {}

    private:

        
        virtual void OnBuildCreatingCode();

        
         wxObject* OnBuildPreview(wxWindow* Parent,long Flags);

        
        virtual wxsPropertyContainer* OnBuildExtra();

        
        virtual bool OnCanAddChild(wxsItem* Item,bool ShowMessage);

        
        virtual bool OnCanAddToParent(wxsParent* Parent,bool ShowMessage);

        
        virtual void OnAddChildQPP(wxsItem* Child,wxsAdvQPP* QPP);

        
        virtual wxString OnXmlGetExtraObjectClass();

        
        virtual void OnEnumItemProperties(long Flags);

        
        virtual void OnAddItemQPP(wxsAdvQPP* QPP);

        long StyleFlags;

        void OnClose(const wxCloseEvent & ) { wxMessageBox(_("AuiManager Closed"), _("Debug Me"), wxICON_INFORMATION);  }
};

#endif
